import { get } from "../../utils/db";
Page({

  /**
   * 页面的初始数据
   */
  data: {
    types: [
     
    ]
  },
  async onLoad() {
    let result = await get({ collection: "type" }).catch(err => {
      console.error(err)
    })
    this.setData({
      types:result.data
    })

  },
  //跳转list页面
  toList(e){
    let id=e.currentTarget.id;    //id
    wx.navigateTo({
      url: '/pages/list/list?id='+id,
    })
  }


})